<?php
class Raxiv_Tables_Admin extends  Zend_Db_Table_Abstract{
	
	protected $_name = 'admin';
	protected  $_primary = 'co_admin';
	protected $_rowClass = 'Raxiv_Models_Admin';
	protected $_dependentTables = array( 'admin_has_perfil_url' );
	
	
	
	public function verificarAcesso($email , $senha){

		$busca = $this->fetchAll(
				$this->select()
				->where("str_email = ?" , $email)
				->where('str_senha = ?' , substr(SHA1($senha), 0 , 45))
				)->current();
		
		if(sizeof($busca)){
			Raxiv_Models_Admin::carregarAcesso($busca);
			return true;
		}
		
		return false;	
	}
	
	

	

	
	
}